Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsconfig

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsconfig

TypeScript project file specification + implementation

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5M
increased by14.16%
Maintainers
2
Weekly downloads
 
Created
Source

TSConfig

NPM version NPM downloads Build status Test coverage

Resolve and parse tsconfig.json, with support for filesGlob (array of glob strings).

Usage

See the TypeScript wiki for information on setting up tsconfig.json. Additionally, this module will parse the filesGlob option, if it exists.

API

  • resolve(dir: string): Promise Find up the location of tsconfig.json.
  • resolveSync(dir: string): string Synchronous resolve.
  • load(dir: string, options?: Options): Promise Resolve, load and parse tsconfig.json.
  • loadSync(dir: string): TSConfig Synchronous load.
  • readFile(filename: string, options?: Options): Promise Read a file as tsconfig.json (BOM, JSON parse, empty file and files expansion).
  • readFileSync(filename: string, options?: Options): TSConfig Synchronous readFile.
  • parseFile(contents: string, filename: string, options?: Options): Promise Parse a string as tsconfig.json (BOM, JSON parse, empty contents and expansion).
  • parseFileSync(contents: string, filename: string, options?: Options): TSConfig Synchronous parseFile.
  • resolveConfig(config: TSConfig, filename: string, options?: Options): Promise Expand a raw tsconfig.json object.
  • resolveConfigSync(config: TSConfig, filename: string, options?: Options): TSConfig Synchronous resolveConfig.

The TSConfig result will always contain an expanded files array (from either filesGlob or exclude). Both files and exclude will be resolved relative to the tsconfig.json file.

Options

  • compilerOptions Default compiler options to apply on expansion (default: {}).
  • filterDefinitions Return a list files which are only .d.ts files (default: false).
  • resolvePaths Resolve paths to absolute and remove duplicate entries (default: true).

Contributing

Please open issues for discussion.

License

MIT License

Keywords

FAQs

Package last updated on 18 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc